<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 功能：判断考试成绩，考上了就喜大普奔 没考上就变身嘤嘤怪
        function calePonit(ponit, fn1, fn2) {
            // ponit考试成绩, fn1通过时调用的函数, fn2未通过时调用的函数
            if(ponit >= 60) {
                fn1()
            }else {
                fn2()
            }
        }

        function success() {
            alert('榜一大哥')
        }

        function fail() {
            alert('嘤嘤嘤')
        }

        calePonit(99, success, fail);

    </script>
</body>
</html>